package com.mall.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import java.util.List;

@Data
public class OrderDTO {
    @NotEmpty(message = "订单商品不能为空")
    private List<OrderItemDTO> items;
    
    @NotBlank(message = "收货地址不能为空")
    private String address;
    
    @NotBlank(message = "收货人不能为空")
    private String receiver;
    
    @NotBlank(message = "联系电话不能为空")
    private String phone;
    
    @Data
    public static class OrderItemDTO {
        @NotNull(message = "商品ID不能为空")
        private Long productId;
        
        @NotNull(message = "商品数量不能为空")
        private Integer quantity;
    }
} 